package io;

import java.io.*;
import java.util.Scanner;

public class NoteDemo_01 {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        FileOutputStream fos = new FileOutputStream("note.txt");
        System.out.println("请输入：");
        String out = scan.nextLine();

        while (out.equalsIgnoreCase("exit") != true){
            System.out.println("请输入：");
            byte[] data = out.getBytes("UTF-8");
            out = scan.nextLine();
            fos.write(data);
        }
        System.out.println("执行完毕!");
        fos.close();

    }
}
